import type { RouteRecordRaw } from "vue-router";
import { allComponent } from "../routes";

/**
 * errorRouter(错误页面路由)
 */
export const errorRouter: RouteRecordRaw[] = [
  {
    path: "/error",
    name: "error",
    meta: {
      title: "错误页",
      open: true,
      hidden: false,
      target: "_blank",
      isLeaf: true,
      icon: "",
    },
    component: allComponent.get("ErrorRouter"),
    children: [
      {
        path: "/error/403",
        name: "403",
        meta: {
          title: "页面未授权",
          open: true,
          hidden: false,
          target: "_blank",
          isLeaf: true,
          icon: "",
        },
        component: allComponent.get("Error403"),
      },
      {
        path: "/error/404",
        name: "404",
        meta: {
          title: "页面不存在",
          open: true,
          hidden: false,
          target: "_blank",
          isLeaf: true,
          icon: "",
        },
        component: allComponent.get("Error404"),
      },
      {
        path: "/error/500",
        name: "500",
        meta: {
          title: "系统错误",
          open: true,
          hidden: false,
          target: "_blank",
          isLeaf: true,
          icon: "",
        },
        component: allComponent.get("Error500"),
      },
      {
        path: "/error/developing",
        name: "developing",
        meta: {
          title: "开发中",
          open: true,
          hidden: false,
          target: "_blank",
          isLeaf: true,
          icon: "",
        },
        component: allComponent.get("ErrorDeveloping"),
      },
    ],
  },
];
